package mdm.com.web.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import mdm.com.web.entity.User;
import mdm.com.web.entity.Wuser;

@Repository
public interface UserMapper {

    Wuser selectByUsernameAndPassword(@Param("username") String username,
            @Param("password") String password);
    
    Wuser selectByWusername(String cUsername);
    
    int deleteByPrimaryKey(Integer cUserId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer cUserId);

    User selectDetailByUserId(Integer cUserId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    User selectByUsername(String cUsername);

    void removeByUserId(Integer cUserId);

    void updateExcept(User user);

    List<User> selectByCondition(User user);

    List<User> selectByDepartmentId(Integer cDepartmentId);

    List<User> selectByRoleId(Integer cRoleId);

    User selectDetailByUsername(String cUsername);

    List<User> selectAll();
}
